{extend name="public/common"} {block name="body"}
<title>基本设置</title>
<style type="text/css">
	table tbody {
		display:block;
		height:650px;
		overflow-y:scroll;
		}
		
	table thead, tbody tr {
		display:table;
		width:100%;
		table-layout:fixed;
		}
		
	table thead {
		width: calc( 99.87% - 1em )
		}
</style>
</head>
<body>
	<nav class="breadcrumb">
		<i class="Hui-iconfont">&#xe67f;</i>
		
		代理管理
		<span class="c-gray en">&gt;</span>
		代理审核
		<a class="btn btn-success radius r"
			style="line-height: 1.6em; margin-top: 3px"
			href="javascript:location.replace(location.href);" title="刷新">
			<i class="Hui-iconfont">&#xe68f;</i>
		</a>
	</nav>
	
	<div style="padding:20px;height:30px;">
  	
  	<div class="new_box">

  <div style="padding-top:20px;">
    <form action="" enctype="application/x-www-form-urlencoded" method="post" style="margin-left:20px;">
  
    <input type="text" name="ss_sql"  placeholder=" 账号/ID/姓名/手机" style="width:150px" class="input-text">
     <button class="btn btn-success" type="submit" style="margin-right:20px;"><i class="Hui-iconfont">&#xe665;</i> 搜索</button>
    注册时间从：
    <input type="text" value="{:input('post.sDate1')}" name="sDate1" onfocus="WdatePicker({maxDate:'%y-%M-%d'})" id="logmin" class="input-text Wdate" style="width:120px;">
     到：
    <input type="text" value="{:input('post.sDate2')}" name="sDate2" onfocus="WdatePicker({maxDate:'%y-%M-%d'})" id="logmax" class="input-text Wdate" style="width:120px;margin-right:15px;">
  <!--   登录时间从：
   <input type="text" onfocus="WdatePicker({minDate:$('#logmin').val()})" id="logmin" class="input-text Wdate" style="width:120px;">
    到：
    <input type="text" onfocus="WdatePicker({minDate:$('#logmax').val()})" id="logmax" class="input-text Wdate" style="width:120px;"> -->
    <button class="btn btn-success" type="submit"><i class="Hui-iconfont">&#xe665;</i> 搜索</button>
    
  </form>
  
  </div>
	<div class="page-container">
			<div id="tab-system" class="HuiTab">
				<div class="tabCon">
					<div class="mt-20">
						<table
							class="table table-border table-bordered table-bg table-hover table-sort table-responsive">
							<thead>
								<tr class="text-c">
									<th>ID</th>
									<th>用户名</th>
									<th>会员等级</th>
									<th>账户总额</th>
									<th>所属上级</th>
									<th>上级返佣点</th>
									<th>状态</th>
									<th>注册时间</th>
									<th>审核状态</th>
									
								</tr>
							</thead>
							<tbody>
							{volist name="query" id="item"}
								<tr class="text-c">
									<td>{$item.uid}</td>
									<td class="text-l"><a style="text-decoration:underline;{if ($item.nbzh == 1)}color:blue{/if}" href="javascript:fav_alert('此等级人数详情','/admin/Member/us_xxzl?&user={$item.username}');">{$item.username}</a></td>
									<td>{$item.hy_name}</td>
									<td>{$item.je}</td>
									<td>{$item.tjr}</td>
									<td>
										{$item.dlfandian}
									</td>
									<td>
										{if condition="$item.open eq 0"}
										 	正常
										 {elseif condition="$item.open eq 1"}
										 	冻结
										 {/if}
									</td>
									<td>{$item.reg_time|date="Y-m-d H:i:s",###}</td>
									
									<td style='text-align:center'>
										<a onclick="open_zhixing_1({$item.uid},'{$item.username ? $item.username : 0}','{$item.tjr ? $item.tjr : 0}',{$item.dlfandian ? $item.dlfandian : 0})" style="text-decoration: none;padding:4px 10px 4px 14px;background-color:#409eff;color:white;" class="ml-5 chongzhi">
											审核
										</a>
										<a onclick="if(confirm('确定拒绝吗?')==false)return false;" style="text-decoration: none;padding:4px 10px 4px 14px;background-color: #fff;color: #333;border: 1px solid #ccc;" class="ml-5 jujue" href="/admin/member/dlExamine?czid={$item.uid}&statu=0">
											拒绝
										</a>
									</td>
									
								</tr>
								{/volist}
							</tbody>
						</table>
					</div>
				</div>
			</div>
	</div>
	</div>
	</div>
	<div id="warning" style="display: none;"></div>
	{/block} {block name="js"}
	<script type="text/javascript">
		$(function() {
			$('.skin-minimal input').iCheck({
				checkboxClass : 'icheckbox-blue',
				radioClass : 'iradio-blue',
				increaseArea : '20%'
			});
			$("#tab-system").Huitab({
				index : 0
			});

					});
function open_zhixing_1(uid,user,topdl,fanyong){
	  layer.open({
		  title:"代理审核",
	  	  content:'<div style="overflow:hidden"><p style="float:left">申请人：</p><span style="float:left">'+user+'</span></div>'
	  	  		+(fanyong==0 ? '' : '<div style="overflow:hidden"><p style="float:left">返佣：</p><span style="float:left">'+fanyong+'</span></div>')
	  	  		+(topdl==0 ? '' : '<div style="overflow:hidden"><p style="float:left">上级不变：</p><input type="radio" style="float:left;margin-top: 5px;" id="xz" name="sex" value="1"/></div>')
	  	  		+'<div style="overflow:hidden"><p style="float:left">一级代理：</p><input type="radio" style="float:left;margin-top: 5px;" id="xz" name="sex" value="0" checked/></div>'
	  	  		+'<div style="overflow:hidden"><p style="float:left">返点：</p><input id="fandian" type="number" value="" /></div>',
		  	yes: function(index, layero){
		  		var fandian = $("#fandian").val();
		  		var sz = $("#xz[type=radio]:checked").val();
  		        window.location.href="/admin/member/dljieshou?uid="+uid+"&fd="+fandian+"&statu=0&xz="+sz;
		  }
	  });
}
setInterval(function () {
	$.get(
			'/admin/index/warning',
			function(data){
				var message = eval("("+data+")");
				if(message.dl){
					var dldata = message.dl;
					for( var key in dldata ){
						if( 2==parseInt(key) ){
							$('#warning').html(dldata[key]);
						}
					}
				}
			},'json'
	);
},15*1000);


function fav_alert(title,url){
	var index = layer.open({
		type: 2,
		title: title,
		area: ['90%', '90%'],
		content: url
	});
}
</script>
<script type="text/javascript" src="__SYSMET__/lib/My97DatePicker/4.8/WdatePicker.js"></script>

{/block}
